-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: rename enum types to singular #1064
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1064 +/- ##
==========================================
+ Coverage 71.72% 72.14% +0.42%
==========================================
Files 381 397 +16
Lines 11918 12232 +314
Branches 2600 2648 +48
==========================================
+ Hits 8548 8825 +277
- Misses 3339 3368 +29
- Partials 31 39 +8
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Thanks @wayneseymour for your PR!
Tre' one note is that sometimes we're assisting Kibana users in such API changes, eg. via small PRs there by the chart PR maker 😉 That's also a reason for, I think, merging a bunch of API breaking changes in one fell swoop, Marco what do you think, with 7.12 around the corner? |
Thank you Tre'! I think it's fine to include multiple changes here, some enums are not currently used much outside the library |
Thanks @wayneseymour this issue is very near and dear to my ❤️ @monfera I think this is just a nice to have that will eventually get into |
Awesome, I'll get on this next week! "Shut it down day" tomorrow in the US :) |
Perfect, I'll fixup asap! Thanks for reviewing! |
93b025c
to
52b37c5
Compare
@monfera @nickofthyme Gents, I'm not sure how to proceed here. |
@wayneseymour that's fine, please see eg.
|
BREAKING CHANGE: The "enums" are no longer plural in signature. fix #767 Signed-off-by: Tre' Seymour <[email protected]>
aa444a8
to
c07d621
Compare
Locally, I've run these build scripts and they passed:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, scanned all the changes online and looks great!
Thanks for taking the time for that.
Just remember to add a breaking change line in the merge commit like the following:
your PR description
BREAKING CHANGE: `AnnotationDomainTypes`, `AnnotationType` and all the others (please list them) are renamed to ....
Indeed I will! Thanks @markov00 |
# [28.0.0](v27.0.0...v28.0.0) (2021-04-02) ### Bug Fixes * **annotations:** provide fallback for line annotation markers ([#1091](#1091)) ([0bd61f1](0bd61f1)) * **legend:** action sizing ui and focus states ([#1102](#1102)) ([3a76a2c](3a76a2c)) * **legend:** stop legend color picker dot twitching ([#1101](#1101)) ([c89b767](c89b767)) ### Code Refactoring * rename enum types to singular ([#1064](#1064)) ([396b3d1](396b3d1)), closes [#767](#767) ### BREAKING CHANGES * `AnnotationDomainTypes`, `AnnotationTypes`, `SeriesTypes`, `ChartTypes`, and `SpecTypes` are renamed to `AnnotationDomainType`, `AnnotationType`, `SeriesType`, `ChartType`, and `SpecType`
🎉 This PR is included in version 28.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Hey @wayneseymour I was sick last week so I didn't see this till now and wanted to clear this up in case you ran into this in the future. I'm thinking this might be an issue with the linter because in typescript when exporting a type or value you create a separate entity for each, so the naming will not clash when doing something like... export const SeriesType = Object.freeze({
Area: 'area' as const,
Bar: 'bar' as const,
Line: 'line' as const,
Bubble: 'bubble' as const,
});
export type SeriesType = $Values<typeof SeriesType>; Typescript calls this |
# [28.0.0](elastic/elastic-charts@v27.0.0...v28.0.0) (2021-04-02) ### Bug Fixes * **annotations:** provide fallback for line annotation markers ([opensearch-project#1091](elastic/elastic-charts#1091)) ([d907c81](elastic/elastic-charts@d907c81)) * **legend:** action sizing ui and focus states ([opensearch-project#1102](elastic/elastic-charts#1102)) ([a58cc0a](elastic/elastic-charts@a58cc0a)) * **legend:** stop legend color picker dot twitching ([opensearch-project#1101](elastic/elastic-charts#1101)) ([f63bb3b](elastic/elastic-charts@f63bb3b)) ### Code Refactoring * rename enum types to singular ([opensearch-project#1064](elastic/elastic-charts#1064)) ([6e900e2](elastic/elastic-charts@6e900e2)), closes [opensearch-project#767](elastic/elastic-charts#767) ### BREAKING CHANGES * `AnnotationDomainTypes`, `AnnotationTypes`, `SeriesTypes`, `ChartTypes`, and `SpecTypes` are renamed to `AnnotationDomainType`, `AnnotationType`, `SeriesType`, `ChartType`, and `SpecType`
Simple search and replace...low hanging fruit.
Also, not sure if the markdown files should be included in this refactor?
fix #767
Summary
I was searching for an easy pr to start understanding this repo.
I think there are still more enums to fixup, such as:
elastic-charts/src/specs/constants.ts
Line 27 in dce139a